<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PayChannel</title>
<link href="styles/general.css" rel="stylesheet" type="text/css" /><link href="styles/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/transport.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
     <script type="text/javascript" src="js/sorttable.js"></script>
    <script src="js/utils.js" type="text/javascript"></script>
	<script type="text/javascript">
		function projectshow(type,id,chid)
		{
			var txt_keyword = document.getElementById("txt_keyword").value;
			if(type=="del")
			{
				if(!window.confirm('警告！！确定要删除吗？'))
					return false;
				else{
					window.location.href="project_save.do?msg="+type+"&model.id="+id+"&txt_keyword="+txt_keyword+"&channel.id="+chid;
				}
			}else
			{
				window.location.href="project_show.do?msg="+type+"&model.id="+id+"&txt_keyword="+txt_keyword+"&channel.id="+chid;
			}
		}
		function channellist(txt_keyword)
		{
			window.location.href="channel_list.do?txt_keyword="+txt_keyword;
		}
	</script>
</head>

<body>
<h1>
        <span class="action-span"><a href="javascript:void(0);" onclick="projectshow('insert','-1','<s:property value="channel.id"/>')">添加项目</a></span> <span
            class="action-span1"><a href="mainframe.jsp">
                首页</a> </span><span id="search_id" class="action-span1">- 项目管理 </span>
    </h1>
            <input name="txt_keyword" type="hidden" id="txt_keyword"  value="<s:property value="txt_keyword"/>"/>
   <!-- start ad menu list -->
    <div class="list-div" id="listDiv">
        <table width="100%" cellspacing="1" cellpadding="2" class="sortable" id="sortable">
            <tbody>
                <tr>
                   <th>序号</th>
			        <th>名称</th>
			        <th>出货日期</th>
			        <th>出货说明</th>
			        <th>操作</th>
                </tr>
                <s:if test="list.size()>0">
  				<s:iterator value="list" status="i"> 
  					 <tr>
                            <td style="background-color: rgb(255, 255, 255);"><s:property value="#i.count"/></td>
						    <td style="background-color: rgb(255, 255, 255);"><s:property value="name"/></td> 
						    <td style="background-color: rgb(255, 255, 255);"><s:property value="shipDate"/></td>
						    <td style="background-color: rgb(255, 255, 255);"><s:property value="shipDesc"/></td>
						    <td align="center" style="background-color: rgb(255, 255, 255);">
						     <s:if test="isUpdate.equals('true')">
							     <a href="javascript:void(0);" onclick="projectshow('update','<s:property value="id"/>','<s:property value="channel.id"/>')">
							     	<img height="16" width="16" border="0" src="img/icon_edit.gif" alt="编辑"></a>&nbsp;
								<a href="javascript:void(0);" onclick="projectshow('del','<s:property value="id"/>','<s:property value="channel.id"/>')"onclick="return window.confirm('警告！！确定要删除吗？')">
									<img height="16" width="16" border="0" src="img/icon_trash.gif" alt="删除">
								</a>	
							</s:if>
							<s:else>
								<a href="javascript:void(0);" onclick="projectshow('update','<s:property value="id"/>','<s:property value="channel.id"/>')">
									<img height="16" width="16" border="0" src="img/icon_view.gif" alt="查看">
								</a>   
							</s:else>
							</td>
  					</tr>
  				</s:iterator>
  				</s:if>
  				<tr>
  					<td colspan="5" align="center"><input type="button" value="返回" class="button" onclick="channellist('<s:property value="txt_keyword"/>')"/></td>
  				</tr>
  </tbody>
  </table>
  </div>
 <!--Bottom开始-->
    <script language="JavaScript">

if (document.getElementById("listDiv"))
{
  document.getElementById("listDiv").onmouseover = function(e)
  {
    obj = Utils.srcElement(e);

    if (obj)
    {
      if (obj.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode;
      else if (obj.parentNode.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode.parentNode;
      else return;

      for (i = 0; i < row.cells.length; i++)
      {
        if (row.cells[i].tagName != "TH") row.cells[i].style.backgroundColor = '#eeeded';
      }
    }

  }

  document.getElementById("listDiv").onmouseout = function(e)
  {
    obj = Utils.srcElement(e);

    if (obj)
    {
      if (obj.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode;
      else if (obj.parentNode.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode.parentNode;
      else return;

      for (i = 0; i < row.cells.length; i++)
      {
          if (row.cells[i].tagName != "TH") row.cells[i].style.backgroundColor = '#FFF';
      }
    }
  }

}

    </script>
    
<div id="footer">
<br />
<s:property value="bottom"/></div>
    <!--Bottom结束-->
</body>
</html>